package com.cdzx.quartz.controller;

import com.cdzx.quartz.service.ScheduleJobServiceImpl;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/job")
public class IndexController {

    @Resource
    private ScheduleJobServiceImpl scheduleJobService;

    @GetMapping("/add")
    public Boolean add() throws Exception {
        scheduleJobService.addJob();
        return true;
    }
}
